home *** CD-ROM | disk | FTP | other *** search
- %OP%DP0
- %OP%FX
- %OP%FY
- %OP%FS
- %OP%NDsuffixnames,c12c21
- %OP%NDdigit,9
- %OP%NDmonth_table,b1b12
- %OP%NDweekdays,c1c7
- %OP%NDdaytext,""
- %OP%NDdate_text,"9.10.91"
- %OP%NDsuffix,c21
- %OP%NDmonthtext,"10"
- %OP%NDyeartext,"91"
- %OP%WC2,1238,1012,1364,0,0,0,0
- %OP%VS3.81 Test (Oct 8 1991), Colton Software - Development, R0123 4567 8901 2345
- %CO:A,78,0%%V%%L%function("format_date","when","daypl","theon","dateon","suffon","ofon","monpl","yearpl","sep:text")
- %V%%L%if(type(@when)<>"date",result("Bad Date"),)
- %V%%L%set_name("yeartext",right(string(year(@when),0),@yearpl))
- %V%%L%set_name("month_table",b1b12)
- %V%%L%set_name("weekdays",c1c7)
- %V%%L%set_name("digit",mod(day(@when),10))
- %V%%L%set_name("suffixnames",c12c21)
- %V%%L%set_name("suffix",index(suffixnames,1,digit+1))
- %V%%L%if(@monpl<>-1,set_name("monthtext",mid(index(month_table,1,month(@when)),1,@monpl)),set_name("monthtext",string(month(@when),0)))
- %V%%L%set_name("daytext",mid(index(weekdays,1,weekday(@when)),1,@daypl))
- %V%%L%if(@daypl<>0,set_name("date_text",daytext),set_name("date_text",""))
- %V%%L%if(@theon=1,set_name("date_text",join(date_text,@sep,c9,@sep)),set_name("date_text",join(date_text,@sep)))
- %V%%L%if(@dateon=1,set_name("date_text",join(date_text,string(day(@when),0))),0)
- %V%%L%if(@suffon=1,set_name("date_text",join(date_text,suffix)),0)
- %V%%L%if(@ofon=1,set_name("date_text",join(date_text,@sep,c10,@sep)),set_name("date_text",join(date_text,@sep)))
- %V%%L%if(@monpl<>0,set_name("date_text",join(date_text,monthtext)),0)
- %V%%L%if(@yearpl<>0,set_name("date_text",join(date_text,@sep,yeartext)),0)
- %V%%L%if(left(date_text,1)=@sep,set_name("date_text",right(date_text,length(date_text)-1)),0)
- %V%%L%result(date_text)
- %CO:B,12,24%January
- February
- March
- April
- May
- June
- July
- August
- September
- October
- November
- December
- %CO:C,12,12%Sunday
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
-
- the
- of
-
- th
- st
- nd
- rd
- th
- th
- th
- th
- th
- th
-